package com.zhima.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zhima.enums.Active;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author zhima
 * @since 2023-08-23
 */
@Data
@TableName("oj_resource")
@ApiModel(value = "OjResource对象", description = "")
public class OjResource implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("资源表id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("前端资源路径")
    @TableField("front_uri")
    private String frontUri;

    @ApiModelProperty("前端展示资源名")
    @TableField("front_name")
    private String frontName;

    @ApiModelProperty("资源名（后续鉴权需要使用）")
    @TableField("resource_name")
    private String resourceCode;

    @ApiModelProperty("资源描述")
    @TableField("description")
    private String description;

    @ApiModelProperty("active启用，un_active不启动")
    @TableField("active")
    private Active active;

    @ApiModelProperty("父级资源id")
    @TableField("parent_id")
    private Integer parentId;
}
